package com.bsb.base.model;

import com.baomidou.mybatisplus.annotations.TableField;

public class SysOrganization {
    private Long id;

    private String name;

    private Long parent_id;

    private String parent_ids;

    private Boolean available = Boolean.TRUE;
    
    private int order_num;
    
    private Long firmId;
    
    @TableField(exist=false)
    private String parentName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParent_id() {
        return parent_id;
    }

    public void setParent_id(Long parent_id) {
        this.parent_id = parent_id;
    }

    public String getParent_ids() {
        return parent_ids;
    }

    public void setParent_ids(String parent_ids) {
        this.parent_ids = parent_ids;
    }

    public Boolean getAvailable() {
        return available;
    }

    public void setAvailable(Boolean available) {
        this.available = available;
    }
    
    public boolean isRootNode() {
        return parent_id == 0;
    }
    

    public String makeSelfAsParentIds() {
        return getParent_ids() + getId() + "/";
    }

	public int getOrder_num() {
		return order_num;
	}

	public void setOrder_num(int order_num) {
		this.order_num = order_num;
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	public Long getFirmId() {
		return firmId;
	}

	public void setFirmId(Long firmId) {
		this.firmId = firmId;
	}
    
    
}